/**
 * 
 */
package org.jboss.minstaller.util



/**
 * @author jjeon@redhat.com
 *
 */
public class TelnetUtil {
    
    public static void telnetCommand(serverIp, userId, passWord, dir, command) {
        def ant = new AntBuilder() 
        ant.telnet( userid:userId, password: passWord, server: serverIp ) { 
            write( command );
            //read(timeout:5, '/home/jjeon');
        }
    }
    
    static void main(args) {
        TelnetUtil.telnetCommand( "localhost", "jboss", "jboss", "/home/jboss", "ls");
    }
}
